import {gameInfo} from "@/api/game/gameInfo";

const game = {
  state: {
      configInfo:null
  },
    mutations: {
      SET_CONFIG_INFO: (state, configInfo) => {
            state.configInfo = configInfo
        },
    },
    actions: {
      GameInfo({commit}, state){
          return new Promise((resolve, reject) => {
              gameInfo().then(res => {
                  commit('SET_CONFIG_INFO', res.data);
                  resolve()
              }).catch(err => {
                  console.log('获取游戏信息失败：', err)
              })
          })
      }
    }
}

export default game